import requests

# 1.模拟登录的入口
url = 'https://passport.17k.com/ck/user/login'

data = {
    'loginName': '18113149153',
    'password': 'QQ0054444944'
}

headers = {
    'User-Agent':
        'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36'
}

resp = requests.post(url, data=data, headers=headers)
# print(resp)
# 登陆失败只返回错误的uuid
# 登陆还会返回登录成功的认证，accessToken
# print(dict(resp.cookies))
cookies = dict(resp.cookies)

# 登陆后才能访问的url,注意请求方式变为了get
url='https://user.17k.com/ck/user/myInfo/102636581?bindInfo=1&appKey=2406394919'
resp = requests.get(url, headers=headers, cookies=cookies)
print(resp)
print(resp.text)